package com.tcp2.frame.taxi;

import javax.swing.*;
import javax.swing.border.TitledBorder;

/**
 * Author: <陈景阳>
 * Time: 2015-09-18 14:09
 * Copyright (C) 2013 Xiamen Yaxon Networks CO.,LTD.
 * 驾驶员取消订单界面
 */
public class Frame0B08 {

    //业务ID
    public JTextField idField = new JTextField();

    //取消原因
    private String[] causes = {"0:事故","1:路堵","2:其他"};
    public JComboBox<String> causeField = new JComboBox<>(causes);

    //主容器
    JPanel jp;

    public Frame0B08(){

    }

    public Frame0B08(JPanel parent) {
        this.jp = parent;
    }

    /**
     * 初始化界面
     */
    public void init(){
        Box box1 = Box.createHorizontalBox();
        JLabel jlDesc = new JLabel("功能描述：当驾驶员因某种原因不能去接送乘客时，\r\n驾驶员通过按键触发ISU发送指令通知中心。\r\n消息ID=0x0B08");
        box1.add(jlDesc);

        JPanel jp1 = new JPanel();
        TitledBorder t2 = new TitledBorder("驾驶员取消订单");
        jp1.setBorder(t2);

        JLabel l1 = new JLabel("业务ID:     ");
        Box box3 = Box.createHorizontalBox();
        box3.add(l1);box3.add(idField);

        JLabel l2 = new JLabel("取消原因:   ");
        Box box4 = Box.createHorizontalBox();
        box4.add(l2);box4.add(causeField);

        Box box2 = Box.createVerticalBox();
        box2.add(Box.createVerticalStrut(10));
        box2.add(box3);
        box2.add(Box.createVerticalStrut(10));
        box2.add(box4);
        box2.add(Box.createVerticalStrut(10));

        jp1.add(box2);

        Box box = Box.createVerticalBox();
        box.add(Box.createVerticalStrut(20));
        box.add(box1);
        box.add(Box.createVerticalStrut(10));
        box.add(jp1);

        jp.add(box,"p4");
    }


}
